<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template mixmax_engine</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../boost_random/reference.html#header.boost.random.mixmax_hpp" title="Header &lt;boost/random/mixmax.hpp&gt;">
<link rel="prev" href="../../BOOST_RAND_1_3_35_5_6_26_2.html" title="Macro BOOST_RANDOM_MERSENNE_TWISTER_DISCARD_THRESHOLD">
<link rel="next" href="mixmax_engine/rng_state_st.html" title="Struct rng_state_st">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../BOOST_RAND_1_3_35_5_6_26_2.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_random/reference.html#header.boost.random.mixmax_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mixmax_engine/rng_state_st.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.random.mixmax_engine"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template mixmax_engine</span></h2>
<p>boost::random::mixmax_engine</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_random/reference.html#header.boost.random.mixmax_hpp" title="Header &lt;boost/random/mixmax.hpp&gt;">boost/random/mixmax.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">int</span> Ndim<span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> SPECIALMUL<span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">int64_t</span> SPECIAL<span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="mixmax_engine.html" title="Class template mixmax_engine">mixmax_engine</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <a name="boost.random.mixmax_engine.result_type"></a><span class="identifier">result_type</span><span class="special">;</span>

  <span class="comment">// member classes/structs/unions</span>

  <span class="keyword">struct</span> <a class="link" href="mixmax_engine/rng_state_st.html" title="Struct rng_state_st">rng_state_st</a> <span class="special">{</span>

    <span class="comment">// public data members</span>
    <span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span><span class="special">,</span> <span class="identifier">Ndim</span> <span class="special">&gt;</span> <span class="identifier">V</span><span class="special">;</span>
    <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <span class="identifier">sumtot</span><span class="special">;</span>
    <span class="keyword">int</span> <span class="identifier">counter</span><span class="special">;</span>
  <span class="special">}</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="mixmax_engine.html#boost.random.mixmax_engineconstruct-copy-destruct">construct/copy/destruct</a></span>
  <span class="keyword">explicit</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_10-bb"><span class="identifier">mixmax_engine</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">explicit</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_11-bb"><span class="identifier">mixmax_engine</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">explicit</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_12-bb"><span class="identifier">mixmax_engine</span></a><span class="special">(</span><span class="identifier">uint32_t</span><span class="special">,</span> <span class="identifier">uint32_t</span><span class="special">,</span> <span class="identifier">uint32_t</span><span class="special">,</span> <span class="identifier">uint32_t</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_13-bb"><span class="identifier">mixmax_engine</span></a><span class="special">(</span><span class="identifier">It</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">It</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SeedSeq<span class="special">&gt;</span> <span class="keyword">explicit</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_14-bb"><span class="identifier">mixmax_engine</span></a><span class="special">(</span><span class="identifier">SeedSeq</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_9-bb">public member functions</a></span>
  <span class="identifier">BOOST_STATIC_CONSTEXPR</span> <span class="identifier">result_type</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_9_1-bb"><span class="identifier">min</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">BOOST_STATIC_CONSTEXPR</span> <span class="identifier">result_type</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_9_2-bb"><span class="identifier">max</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_9_3-bb"><span class="identifier">seed</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <span class="special">=</span> <span class="identifier">default_seed</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_9_4-bb"><span class="identifier">seed</span></a><span class="special">(</span><span class="identifier">It</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">It</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SeeqSeq<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_9_5-bb"><span class="identifier">seed</span></a><span class="special">(</span><span class="identifier">SeeqSeq</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_9_6-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Iter<span class="special">&gt;</span> <span class="keyword">void</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_9_7-bb"><span class="identifier">generate</span></a><span class="special">(</span><span class="identifier">Iter</span><span class="special">,</span> <span class="identifier">Iter</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_9_8-bb"><span class="identifier">discard</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_15-bb">friend functions</a></span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">&gt;</span> 
    <span class="keyword">friend</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
    <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_15_1-bb"><span class="keyword">operator</span><span class="special">&lt;&lt;</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="mixmax_engine.html" title="Class template mixmax_engine">mixmax_engine</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">&gt;</span> 
    <span class="keyword">friend</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
    <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_15_2-bb"><span class="keyword">operator</span><span class="special">&gt;&gt;</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="mixmax_engine.html" title="Class template mixmax_engine">mixmax_engine</a> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_16-bb">private member functions</a></span>
  <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_16_1-bb"><span class="identifier">MOD_MERSENNE</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_16_2-bb"><span class="identifier">MULWU</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_16_3-bb"><span class="identifier">seed_vielbein</span></a><span class="special">(</span><span class="identifier">rng_state_t</span> <span class="special">*</span><span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_16_4-bb"><span class="identifier">seed_uniquestream</span></a><span class="special">(</span><span class="identifier">rng_state_t</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">uint32_t</span><span class="special">,</span> <span class="identifier">uint32_t</span><span class="special">,</span> <span class="identifier">uint32_t</span><span class="special">,</span> 
                         <span class="identifier">uint32_t</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_16_5-bb"><span class="identifier">iterate_raw_vec</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> 
  <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_16_6-bb"><span class="identifier">apply_bigskip</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">uint32_t</span><span class="special">,</span> <span class="identifier">uint32_t</span><span class="special">,</span> 
                <span class="identifier">uint32_t</span><span class="special">,</span> <span class="identifier">uint32_t</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_16_7-bb"><span class="identifier">modadd</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> 
  <a class="link" href="mixmax_engine.html#id-1_3_35_5_6_27_1_1_1_16_8-bb"><span class="identifier">fmodmulM61</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span><span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// public data members</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <span class="identifier">mixmax_min</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <span class="identifier">mixmax_max</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">bool</span> <span class="identifier">has_fixed_range</span><span class="special">;</span>
  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">int</span> <span class="identifier">N</span><span class="special">;</span>  <span class="comment">// The main internal parameter, size of the defining MIXMAX matrix. </span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.35.5.6.26.3.4"></a><h2>Description</h2>
<p>Instantiations of class template <a class="link" href="mixmax_engine.html" title="Class template mixmax_engine">mixmax_engine</a> model,  <a class="link" href="../../boost_random/reference.html#boost_random.reference.concepts.pseudo_random_number_generator" title="Pseudo-Random Number Generator">pseudo-random number generator</a>  . It uses the MIXMAX generator algorithms from:</p>
<p> </p>
<div class="blockquote"><blockquote class="blockquote">
<p>  G.K.Savvidy and N.G.Ter-Arutyunian, On the Monte Carlo simulation of physical systems, J.Comput.Phys. 97, 566 (1991); Preprint EPI-865-16-86, Yerevan, Jan. 1986 <a href="http://dx.doi.org/10.1016/0021-9991(91)90015-D" target="_top">http://dx.doi.org/10.1016/0021-9991(91)90015-D</a></p>
<p>K.Savvidy The MIXMAX random number generator Comp. Phys. Commun. 196 (2015), pp 161–165 <a href="http://dx.doi.org/10.1016/j.cpc.2015.06.003" target="_top">http://dx.doi.org/10.1016/j.cpc.2015.06.003</a></p>
<p>K.Savvidy and G.Savvidy Spectrum and Entropy of C-systems. MIXMAX random number generator Chaos, Solitons &amp; Fractals, Volume 91, (2016) pp. 33–38 <a href="http://dx.doi.org/10.1016/j.chaos.2016.05.003" target="_top">http://dx.doi.org/10.1016/j.chaos.2016.05.003</a>  </p>
</blockquote></div>
<p> </p>
<p>The generator crucially depends on the choice of the parameters. The valid sets of parameters are from the published papers above. </p>
<div class="refsect2">
<a name="id-1.3.35.5.6.26.3.4.5"></a><h3>
<a name="boost.random.mixmax_engineconstruct-copy-destruct"></a><code class="computeroutput">mixmax_engine</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="id-1_3_35_5_6_27_1_1_1_10-bb"></a><span class="identifier">mixmax_engine</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>Constructor, unit vector as initial state, acted on by A^2^512. </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="id-1_3_35_5_6_27_1_1_1_11-bb"></a><span class="identifier">mixmax_engine</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span><span class="special">)</span><span class="special">;</span></pre>Constructor, one 64-bit seed. <p>&lt; constructor, one uint64_t seed, random numbers are statistically independent from any two distinct seeds, e.g. consecutive seeds are ok </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">explicit</span> <a name="id-1_3_35_5_6_27_1_1_1_12-bb"></a><span class="identifier">mixmax_engine</span><span class="special">(</span><span class="identifier">uint32_t</span> clusterID<span class="special">,</span> <span class="identifier">uint32_t</span> machineID<span class="special">,</span> <span class="identifier">uint32_t</span> runID<span class="special">,</span> 
                       <span class="identifier">uint32_t</span> streamID<span class="special">)</span><span class="special">;</span></pre>Constructor, four 32-bit seeds for 128-bit seeding flexibility. </li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <a name="id-1_3_35_5_6_27_1_1_1_13-bb"></a><span class="identifier">mixmax_engine</span><span class="special">(</span><span class="identifier">It</span> <span class="special">&amp;</span> first<span class="special">,</span> <span class="identifier">It</span> last<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SeedSeq<span class="special">&gt;</span> <span class="keyword">explicit</span> <a name="id-1_3_35_5_6_27_1_1_1_14-bb"></a><span class="identifier">mixmax_engine</span><span class="special">(</span><span class="identifier">SeedSeq</span> <span class="special">&amp;</span> seq<span class="special">)</span><span class="special">;</span></pre></li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.35.5.6.26.3.4.6"></a><h3>
<a name="id-1_3_35_5_6_27_1_1_1_9-bb"></a><code class="computeroutput">mixmax_engine</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_STATIC_CONSTEXPR</span> <span class="identifier">result_type</span> <a name="id-1_3_35_5_6_27_1_1_1_9_1-bb"></a><span class="identifier">min</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="identifier">BOOST_STATIC_CONSTEXPR</span> <span class="identifier">result_type</span> <a name="id-1_3_35_5_6_27_1_1_1_9_2-bb"></a><span class="identifier">max</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_35_5_6_27_1_1_1_9_3-bb"></a><span class="identifier">seed</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> seedval <span class="special">=</span> <span class="identifier">default_seed</span><span class="special">)</span><span class="special">;</span></pre>seed with one 64-bit seed </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> It<span class="special">&gt;</span> <span class="keyword">void</span> <a name="id-1_3_35_5_6_27_1_1_1_9_4-bb"></a><span class="identifier">seed</span><span class="special">(</span><span class="identifier">It</span> <span class="special">&amp;</span> first<span class="special">,</span> <span class="identifier">It</span> last<span class="special">)</span><span class="special">;</span></pre>
<p>Sets the state of the generator using values from an iterator range. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SeeqSeq<span class="special">&gt;</span> <span class="keyword">void</span> <a name="id-1_3_35_5_6_27_1_1_1_9_5-bb"></a><span class="identifier">seed</span><span class="special">(</span><span class="identifier">SeeqSeq</span> <span class="special">&amp;</span> seq<span class="special">)</span><span class="special">;</span></pre>
<p>Sets the state of the generator using values from a <code class="computeroutput"><a class="link" href="seed_seq.html" title="Class seed_seq">seed_seq</a></code>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <a name="id-1_3_35_5_6_27_1_1_1_9_6-bb"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>return one uint64 between min=0 and max=2^61-1 </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Iter<span class="special">&gt;</span> <span class="keyword">void</span> <a name="id-1_3_35_5_6_27_1_1_1_9_7-bb"></a><span class="identifier">generate</span><span class="special">(</span><span class="identifier">Iter</span> first<span class="special">,</span> <span class="identifier">Iter</span> last<span class="special">)</span><span class="special">;</span></pre>
<p>Fills a range with random values </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_35_5_6_27_1_1_1_9_8-bb"></a><span class="identifier">discard</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> nsteps<span class="special">)</span><span class="special">;</span></pre>discard n steps, required in boost::random </li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.35.5.6.26.3.4.7"></a><h3>
<a name="id-1_3_35_5_6_27_1_1_1_15-bb"></a><code class="computeroutput">mixmax_engine</code> friend functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">&gt;</span> 
  <span class="keyword">friend</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
  <a name="id-1_3_35_5_6_27_1_1_1_15_1-bb"></a><span class="keyword">operator</span><span class="special">&lt;&lt;</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_ostream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> ost<span class="special">,</span> 
             <span class="keyword">const</span> <a class="link" href="mixmax_engine.html" title="Class template mixmax_engine">mixmax_engine</a> <span class="special">&amp;</span> me<span class="special">)</span><span class="special">;</span></pre>
<p>save the state of the RNG to a stream </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> CharT<span class="special">,</span> <span class="keyword">typename</span> Traits<span class="special">&gt;</span> 
  <span class="keyword">friend</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> 
  <a name="id-1_3_35_5_6_27_1_1_1_15_2-bb"></a><span class="keyword">operator</span><span class="special">&gt;&gt;</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">basic_istream</span><span class="special">&lt;</span> <span class="identifier">CharT</span><span class="special">,</span> <span class="identifier">Traits</span> <span class="special">&gt;</span> <span class="special">&amp;</span> in<span class="special">,</span> <a class="link" href="mixmax_engine.html" title="Class template mixmax_engine">mixmax_engine</a> <span class="special">&amp;</span> me<span class="special">)</span><span class="special">;</span></pre>
<p>read the state of the RNG from a stream </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.35.5.6.26.3.4.8"></a><h3>
<a name="id-1_3_35_5_6_27_1_1_1_16-bb"></a><code class="computeroutput">mixmax_engine</code> private member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <a name="id-1_3_35_5_6_27_1_1_1_16_1-bb"></a><span class="identifier">MOD_MERSENNE</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> k<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <a name="id-1_3_35_5_6_27_1_1_1_16_2-bb"></a><span class="identifier">MULWU</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> k<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_35_5_6_27_1_1_1_16_3-bb"></a><span class="identifier">seed_vielbein</span><span class="special">(</span><span class="identifier">rng_state_t</span> <span class="special">*</span> X<span class="special">,</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> i<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="id-1_3_35_5_6_27_1_1_1_16_4-bb"></a><span class="identifier">seed_uniquestream</span><span class="special">(</span><span class="identifier">rng_state_t</span> <span class="special">*</span> Xin<span class="special">,</span> <span class="identifier">uint32_t</span> clusterID<span class="special">,</span> 
                       <span class="identifier">uint32_t</span> machineID<span class="special">,</span> <span class="identifier">uint32_t</span> runID<span class="special">,</span> <span class="identifier">uint32_t</span> streamID<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> 
<a name="id-1_3_35_5_6_27_1_1_1_16_5-bb"></a><span class="identifier">iterate_raw_vec</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <span class="special">*</span> Y<span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> sumtotOld<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> 
<a name="id-1_3_35_5_6_27_1_1_1_16_6-bb"></a><span class="identifier">apply_bigskip</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <span class="special">*</span> Vout<span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <span class="special">*</span> Vin<span class="special">,</span> 
              <span class="identifier">uint32_t</span> clusterID<span class="special">,</span> <span class="identifier">uint32_t</span> machineID<span class="special">,</span> <span class="identifier">uint32_t</span> runID<span class="special">,</span> 
              <span class="identifier">uint32_t</span> streamID<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> <a name="id-1_3_35_5_6_27_1_1_1_16_7-bb"></a><span class="identifier">modadd</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> foo<span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> bar<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem"><pre class="literallayout"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> 
<a name="id-1_3_35_5_6_27_1_1_1_16_8-bb"></a><span class="identifier">fmodmulM61</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> cum<span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> s<span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uint64_t</span> a<span class="special">)</span><span class="special">;</span></pre></li>
</ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2000-2005 Jens Maurer<br>Copyright © 2009, 2010 Steven Watanabe<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../../BOOST_RAND_1_3_35_5_6_26_2.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_random/reference.html#header.boost.random.mixmax_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="mixmax_engine/rng_state_st.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
